package com.demo.api;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.demo.domain.User;
import com.demo.domain.UserRepository;

@RestController
public class DemoBusiService {
	
	@Resource
	UserRepository userRepository;
	
	@RequestMapping("/getUserByName")
	public User getUser(String name) {
		User user = userRepository.findUser(name);
		return user;
	}
}
